#include "Tank.h"

using namespace DKGL;

Tank::Tank()
{
	construct();
	showAxes(true);
}


Tank::~Tank()
{}


void Tank::construct()
{
	Cube* cube = new Cube("Tank", 5.0f);
	cube->enableLighting(false);
	cube->setRenderMode(RM_POLYGON);
	cube->setColor(Colorf::BLUE, 0);
	cube->setColor(Colorf::BLUE, 1);
	cube->setColor(Colorf::BLUE, 2);
	cube->setColor(Colorf::BLUE, 3);
	cube->setColor(Colorf::BLUE, 4);
	cube->setColor(Colorf::BLUE, 5);
	cube->translate(0, 2.5f, 0, LOCAL);

    Box* turret = new Box(3, 3, 2);
    turret->translate(Vector3(0, 5, 0), LOCAL);

    Box* gun = new Box(1, 6, 1);
    gun->translate(Vector3(0, 0, -4), LOCAL);

    turret->pushChild(gun);

    cube->pushChild(turret);


	pushChild(cube);
}